/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upc.sma.visual;

import edu.upc.sma.agents.MySpringAgent;
import com.springrts.ai.AIFloat3;
import com.springrts.ai.oo.Unit;
import java.util.List;
import java.util.Vector;

/**
 *
 * @author xavi
 */
public class JASONboss implements SpringBoss{

    private MySpringAgent agent;

    public JASONboss(MySpringAgent agent){
        this.agent = agent;
    }

    // +++++++++++++++++++  ACTIONS ++++++++++++++++++++

    @Override
    public void move() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void constructUnit(String unit, int nUnits, int id){
        for(int i=0; i<nUnits; i++){
            while(agent.defaultUnitConstruct(unit,id)<0){}
        }
    }

    @Override
    public void constructBuilding(String building){
        while(agent.defaultBuildingConstruct(building)<0){}
    }

    @Override
    public void attack() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    // ++++++++++++++++++++   CALLBACKS  +++++++++++++++++++++++

    @Override
    public Vector<Integer> getMapMeasures(){
        return agent.getMapMeasures();
    }

    @Override
    public Vector<Float> getCommanderPosition(){
        return agent.getCommanderPosition();
    }

    @Override
    public float getMetalAvailable(){
        return agent.getMetalAvailable();
    }

    @Override
    public float getEnergyAvailable(){
        return agent.getEnergyAvailable();
    }

    @Override
    public float getMetalCost(String unit){
        return agent.getMetalCost( unit);
    }

    @Override
    public float getEnergyCost(String unit){
        return agent.getEnergyCost( unit);
    }

    @Override
    public String getDependence(String unit){
        return agent.getDependence(unit);
    }

    // +++++++++++++++++++++   EVENTS  +++++++++++++++++++++++++

    @Override
    public void addEvent(String event) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void gameStarted() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void buildingConstructed(String building) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void orderUnitsConstructed(int id) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void enemyCommanderEnterLOS(Vector<Float> position){
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void refreshTeamUnits(List<Unit> units) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void refreshEnemyLOSandRadar(List<Unit> enemiesLOS, List<Unit> enemiesRadar) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void refreshMines(List<AIFloat3> minesList) throws Exception {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void refreshResourcesMake(float metal, float energy) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void refreshResourcesUse(float metal, float energy) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void refreshMetalEconomy(String resource, float current, float income, float storage, float usage) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void refreshEnergyEconomy(String resource, float current, float income, float storage, float usage) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

}
